import { createSlice } from '@reduxjs/toolkit';
interface IserviceParams {
    serviceUserIdList: string;
    serviceDescribe?: string;
    img?: Object[];
    evaluateDesc?: string;
    score?: number;
}
export const serviceParams = (): IserviceParams => {
    return {
        serviceUserIdList: '',
        serviceDescribe: '',
        img: [],
        evaluateDesc: '',
        score: null
    }
}
export const serviceEnterParams = createSlice({
    name: 'serviceEnterParams',
    initialState: {
        serviceParams: serviceParams(),
        count: 0
    },
    reducers: {
        onServiceEnterParams: (state, actions) => {
            state.serviceParams = {
                ...state.serviceParams,
                ...actions.payload
            }
        },
        onAddNumber: (state) => {
            state.count += 1
        }
    }
})
// export const { onServiceEnterParams,onAddNumber } = serviceEnterParams.actions;
export default serviceEnterParams.reducer;
